package com.avery.imp;

import org.mybatis.spring.support.SqlSessionDaoSupport;

import com.avery.dao.IUserRelationshipDao;
import com.avery.entity.Userrelationship;

public class UserRelationshipDaoImp extends SqlSessionDaoSupport implements IUserRelationshipDao {

	public void insert(Userrelationship relationship) {
		
		getSqlSession().insert("com.avery.entity.Userrelationship.insert", relationship);
		
	}

	public void deleteByID(int relationID) {
		
		getSqlSession().delete("com.avery.entity.Userrelationship.delete", relationID);
		
	}
	
	public Userrelationship findByUserIDAndFriendID(Userrelationship userRelationship){
		
		return getSqlSession().selectOne("com.avery.entity.Userrelationship.findByUserIDAndFriendID", userRelationship);
	}

}
